System Examination involves evaluating whether a computer system or network contains what it is intended to contain and only what it is intended to contain, and is behaving according to expectations. This cannot be done without defining expectations of what it should contain and how it should behave.
Since our VM was not built by us, we would be dependent on receiving expected state documentation from whoever ran it before us. We will take the position that such documentation/policy is non-existent for our system beyond the brief description of the server we saw in Lab 1. So our examination of the system will provide our baseline documentation of the system’s current state.
The content of a system may be divided up in any way that makes sense for your organization. For our purposes, we will ignore hardware since we are using virtual machines, and focus instead on software and data.
To keep this part manageable in the time we have for the course, we will only focus on software that is installed as a package or group of packages. We will ignore manually installed software that is not managed by the APT package tools.
debsums
packagedebsums
command to check the binary and configuration files in the openssh-client
package/etc/ssh/ssh_config
file in a trivial way/usr/bin/scp
file to /usr/bin/scp.orig
scp
program/usr/bin/scp.orig
back to /usr/bin/scp
setuid
or setgid
files?/
, /etc
, /bin
, /sbin
, or anywhere under /usr
?How is awareness of this state information kept current?
Install and try Lynis and AIDE for system examination and evaluation.
Review the suggestions at https://wiki.ubuntu.com/BasicSecurity/DidIJustGetOwned.
This lab is intended to familiarize you with the basic tools used to examine any system for security-related purposes. There is nothing to hand in for this lab. The more you do with it, the better positioned you will be for the remainder of the CYBE program. This is purely a learning reinforcement activity.
#!/bin/bash # simple script to identify files that are executable (programs) which did not come from installed system packages # could be improved in a number of ways IFS=$'\xa' find / -type f -executable >/tmp/filelist.$$ for file in $(cat /tmp/filelist.$$); do dpkg -S "$file" >/dev/null 2>/dev/null || echo "$file" done rm /tmp/filelist.$$
#!/bin/bash
# simple script to identify files that are executable (programs) which did not come from installed system packages
# could be improved in a number of ways
IFS=$'\xa'
find / -type f -executable >/tmp/filelist.$$
for file in $(cat /tmp/filelist.$$); do
dpkg -S "$file" >/dev/null 2>/dev/null || echo "$file"
done
rm /tmp/filelist.$$